#ifndef XMLTABMODEL_H
#define XMLTABMODEL_H

#include <QAbstractTableModel>
#include <QList>
#include <QStringList>
#include <QVector>
#include <QMap>
#include <QColor>
#include "schema.h"

class XMLTabModel: public QAbstractTableModel
{
Q_OBJECT

public:

explicit XMLTabModel( QObject * parent = 0 );
~XMLTabModel();
int rowCount( const QModelIndex & parent = QModelIndex() ) const;
int columnCount (const QModelIndex & parent = QModelIndex() ) const;
QVariant data( const QModelIndex & index,
               int role = Qt::DisplayRole ) const;
void set_data( const QList< QMap<int, QString> > & data,
               bool ncat_export );
Qt::ItemFlags flags(const QModelIndex & index) const;
bool setData ( const QModelIndex & index,
               const QVariant & value,
               int role = Qt::EditRole );
void set_ignored_rows(int rows);

public slots:

private:

QList< QMap<int, QString> > model_data;
int rows_count;
int columns_count;
int ignored_rows;
QMap<int, QString> ncat_columns;
void set_ncat_map();

};

#endif // XMLTABMODEL_H
